<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    xmlns:f="http://java.sun.com/jsf/core"
	    xmlns:h="http://java.sun.com/jsf/html"
	    xmlns:ui="http://java.sun.com/jsf/facelets"
	    xmlns:p="http://primefaces.prime.com.tr/ui"
	    template="/template/template.xhtml">
    
   	<ui:param name="pageTitle" value="Lista de Editais" />
   	
    <ui:define name="body">
    	<h:form>
			<h:panelGrid>
				<h:outputText value="Nenhum dado encontrado"
					rendered="#{empty lanceController.edital}" />

				<f:facet name="header">Data Inicio</f:facet>
				<h:outputText value="#{lanceController.edital.dataInicio}" />

				<f:facet name="header">Data Fim</f:facet>
				<h:outputText value="#{lanceController.edital.dataFim}" />

				<f:facet name="header">Descricao</f:facet>
				<h:outputText value="#{lanceController.edital.descricao}" />

				<f:facet name="header">Quantidade</f:facet>
				<h:outputText value="#{lanceController.edital.quantidade}" />

				<f:facet name="header">Preco Inicial</f:facet>
				<h:outputText value="#{lanceController.edital.precoInicial}" />

				<f:facet name="header">Preco Final</f:facet>
				<h:outputText value="#{lanceController.edital.precoFinal}" />

				<f:facet name="header">Produto</f:facet>
				<h:outputText value="#{lanceController.edital.produto.nome}" />

				<f:facet name="header">Criador</f:facet>
				<h:outputText value="#{lanceController.edital.criador.nome}" />
				
				<f:facet name="header">Ultimo Lance</f:facet>
				<h:outputText value="#{lanceController.lanceAtual.lance}" />
				
				<f:facet name="header">Usuario Ultimo Lance</f:facet>
				<h:outputText value="#{lanceController.lanceAtual.usuario.nome}" />

				<f:facet name="header">Valor do Lance</f:facet>
				<h:inputText value="#{lanceController.lance.lance}" />

				<h:commandButton action="#{lanceController.efetuarLance()}"
					value="darLance" />
				<h:commandButton action="#{lanceController.excluirlance(_lance)}"
					value="Excluir" />
			</h:panelGrid>
		</h:form>
    </ui:define>
</ui:composition>